import scrapy
class MainpageSpider(scrapy.Spider):
# 爬虫的名字
name = "mainpage"
# 允许爬取的域名
allowed_domains = ["techlabplt.com"]
# 起始的URL地址
start_urls = ["http://www.techlabplt.com"]
	
def parse(self, response):
# 请求完成后的操作
with open('mainpage.html', 'wb') as mp:
	#把response存入mainpage.html
mp.write(response.body)
